:root {
    /* Theme palette */
    color-scheme: dark;
    --bg-deep: #0b1221;
    --bg-mid: #121c30;
    --bg-soft: rgba(21, 30, 46, 0.82);
    --panel-border: rgba(148, 163, 184, 0.28);
    --text-primary: #e5e9f0;
    --text-muted: #a1aecb;
    --accent: #88c0d0;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: radial-gradient(circle at 20% 20%, rgba(94, 129, 172, 0.18), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(191, 97, 106, 0.25), transparent 40%),
        linear-gradient(160deg, var(--bg-deep) 0%, #132238 35%, var(--bg-mid) 100%);
}

/* Canvas column */
.container {
    flex: 1;
    margin: 32px;
}

#paper {
    border-radius: 28px;
    background: var(--bg-soft);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 32px 80px rgba(8, 15, 26, 0.65);
    overflow: hidden;
}

/* Control column */
#hud {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 360px;
    padding: 32px 32px 32px 0;
    pointer-events: none;
}

#info,
#controls {
    pointer-events: auto;
    background: rgba(14, 22, 36, 0.92);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(5, 10, 18, 0.55);
}

#info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

#graph-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

#graph-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

#layout-summary {
    margin: 0;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.9);
}

#controls {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#controls h2 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

/* Control groups */
.control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group label {
    font-size: 13px;
    color: var(--text-muted);
}

.control-group span {
    font-size: 12px;
    color: var(--accent);
    min-width: 32px;
    text-align: right;
}

.control-group div {
    display: flex;
    align-items: center;
    gap: 8px;
}


.control-group select {
    width: 160px;
}

.control-group input[type='range'] {
    width: 120px;
}

select,
input[type='range'] {
    font-family: inherit;
    font-size: 13px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(22, 33, 51, 0.85);
    color: var(--text-primary);
    padding: 8px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
input[type='range']:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(136, 192, 208, 0.2);
}

input[type='range'] {
    -webkit-appearance: none;
    height: 6px;
    padding: 0;
    background: rgba(17, 31, 49, 0.6);
}

input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid rgba(12, 20, 32, 0.8);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(6, 12, 24, 0.6);
}

input[type='range']::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid rgba(12, 20, 32, 0.8);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(6, 12, 24, 0.6);
}

.control-group.checkbox label {
    cursor: pointer;
}

.control-group.checkbox input[type='checkbox'] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    appearance: none;
    background: rgba(22, 33, 51, 0.85);
    position: relative;
    cursor: pointer;
}

.control-group.checkbox input[type='checkbox']:checked::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 4px;
    background: var(--accent);
}

.footnote {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}
